package router

import (
	"jgt-oper/src/context"
	"jgt-oper/src/svc"

	"github.com/facebookgo/inject"
	"github.com/teambition/gear"
)

// SvcEnterpriseMap 注册登录管理路由映射
func SvcEnterpriseMap(g *inject.Graph, router *gear.Router) {
	enterpriseSvc := new(svc.Enterprise)
	err := g.Provide(&inject.Object{Value: enterpriseSvc})
	if err != nil {
		panic(err)
	}

	router.Get("/enterprise", context.WrapContext(enterpriseSvc.Get))
	router.Post("/enterprise/:id", context.WrapContext(enterpriseSvc.Update))
}
